**************************
**** TABLE 3, PANEL A ****
**************************

btscs nat_conflict_onset_2 year id2, g(peaceyears) nspline(3)
rename peaceyears peaceyears_3a
rename _spline1 _spline1_3a
rename _spline2 _spline2_3a
rename _spline3 _spline3_3a

logit  nat_conflict_onset_2 logoil_gas_valuePOP_1 logGDP_cap2000_sup_1  pop_log_1 peaceyears_3a _spline1_3a _spline2_3a _spline3_3a, cluster(id) 
outreg2 using "table3a", replace bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel A) 
  
gen samplea1 = 1 if e(sample)==1 
logit  nat_conflict_onset_2  logoil_gas_valuePOP_1  pop_log_1 peaceyears_3a _spline1_3a _spline2_3a _spline3_3a if samplea1==1, cluster(id) 
outreg2 using "table3a", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel A)

logit  nat_conflict_onset_2 logoil_gas_valuePOP_1 logGDP_cap2000_sup_1  pop_log_1 polity_1 polity_sq_1 ef relfrac lmtnest ncontig nwstate instab_new_1 peaceyears_3a _spline1_3a _spline2_3a _spline3_3a, cluster(id) 
outreg2 using "table3a", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel A)

gen samplea3 = 1 if e(sample)==1 
logit  nat_conflict_onset_2  logoil_gas_valuePOP_1  pop_log_1 polity_1 polity_sq_1 ef relfrac lmtnest ncontig nwstate instab_new_1 peaceyears_3a _spline1_3a _spline2_3a _spline3_3a if samplea3==1, cluster(id) 
outreg2 using "table3a", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel A)

logit  nat_conflict_onset_2 logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_3a _spline1_3a _spline2_3a _spline3_3a me_nafr ssafrica latin asia, cluster(id)   
outreg2 using "table3a", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel A)

gen samplea5 = 1 if e(sample)==1 
logit  nat_conflict_onset_2  logoil_gas_valuePOP_1  pop_log_1 peaceyears_3a _spline1_3a _spline2_3a _spline3_3a me_nafr ssafrica latin asia if samplea5==1, cluster(id) 
outreg2 using "table3a", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel A)

logit  nat_conflict_onset_2 logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_3a _spline1_3a _spline2_3a _spline3_3a if me_nafr==0, cluster(id)   
outreg2 using "table3a", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel A)

gen samplea7 = 1 if e(sample)==1 
logit  nat_conflict_onset_2  logoil_gas_valuePOP_1  pop_log_1 peaceyears_3a _spline1_3a _spline2_3a _spline3_3a if me_nafr==0 & samplea7==1, cluster(id) 
outreg2 using "table3a", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel A)

logit  nat_conflict_onset_2 logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_3a _spline1_3a _spline2_3a  _spline3_3a if id!="IRN" & id!="IRQ", cluster(id) 
outreg2 using "table3a", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel A)

gen samplea9 = 1 if e(sample) == 1 
logit  nat_conflict_onset_2  logoil_gas_valuePOP_1  pop_log_1 peaceyears_3a _spline1_3a _spline2_3a _spline3_3a if id!="IRN" & id!="IRQ" & samplea9==1, cluster(id) 
outreg2 using "table3a", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel A)

drop samplea1
drop samplea3
drop samplea5
drop samplea7
drop samplea9


***************************
**** TABLE 3, PANEL B ****
**************************

btscs fl_center_table3 year id2, g(peaceyears) nspline(3)
rename peaceyears peaceyears_3b
rename _spline1 _spline1_3b
rename _spline2 _spline2_3b
rename _spline3 _spline3_3b

logit fl_center_table3 logoil_gas_valuePOP_1 logGDP_cap2000_sup_1  pop_log_1 peaceyears_3b _spline1_3b _spline2_3b _spline3_3b, cluster(id)  
outreg2 using "table3b", replace bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel B) 

gen sampleb1 = 1 if e(sample)==1
logit fl_center_table3 logoil_gas_valuePOP_1  pop_log_1 peaceyears_3b _spline1_3b _spline2_3b _spline3_3b if sampleb1==1, cluster(id)  
outreg2 using "table3b", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel B)

logit fl_center_table3 logoil_gas_valuePOP_1 logGDP_cap2000_sup_1  pop_log_1 polity_1 polity_sq_1 ef relfrac lmtnest ncontig nwstate instab_new_1 peaceyears_3b _spline1_3b _spline2_3b _spline3_3b, cluster(id)
outreg2 using "table3b", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel B)

gen sampleb3 = 1 if e(sample)==1
logit  fl_center_table3 logoil_gas_valuePOP_1  pop_log_1 polity_1 polity_sq_1 ef relfrac lmtnest ncontig nwstate instab_new_1 peaceyears_3b _spline1_3b _spline2_3b _spline3_3b if sampleb3==1, cluster(id)
outreg2 using "table3b", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel B)

logit  fl_center_table3 logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_3b _spline1_3b _spline2_3b _spline3_3b me_nafr ssafrica latin asia, cluster(id)
outreg2 using "table3b", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel B)  

gen sampleb5 = 1 if e(sample)==1
logit  fl_center_table3 logoil_gas_valuePOP_1  pop_log_1 peaceyears_3b _spline1_3b _spline2_3b _spline3_3b me_nafr ssafrica latin asia if sampleb5==1, cluster(id)
outreg2 using "table3b", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel B) 

logit  fl_center_table3 logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_3b _spline1_3b _spline2_3b _spline3_3b if me_nafr==0, cluster(id)
outreg2 using "table3b", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel B)  

gen sampleb7 = 1 if e(sample)==1
logit  fl_center_table3 logoil_gas_valuePOP_1  pop_log_1 peaceyears_3b _spline1_3b _spline2_3b _spline3_3b if me_nafr==0 & sampleb7==1, cluster(id)
outreg2 using "table3b", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel B) 
 
logit  fl_center_table3 logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_3b _spline1_3b _spline2_3b _spline3_3b if id!="IRN" & id!="IRQ", cluster(id) 
outreg2 using "table3b", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel B)  

gen sampleb9 = 1 if e(sample) == 1
logit  fl_center_table3 logoil_gas_valuePOP_1  pop_log_1 peaceyears_3b _spline1_3b _spline2_3b _spline3_3b if id!="IRN" & id!="IRQ" & sampleb9==1, cluster(id)
outreg2 using "table3b", bdec(3) tdec(3) rdec(2) nocon title(Table 3 Panel B)

drop sampleb1
drop sampleb3
drop sampleb5
drop sampleb7
drop sampleb9


***************************
**** TABLE 4, PANEL A ****
**************************

btscs prio_center_termination year id2 if revised_sample==1, g(peaceyears) nspline(3)
rename peaceyears peaceyears_4a
rename _spline1 _spline1_4a
rename _spline2 _spline2_4a
rename _spline3 _spline3_4a

logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if revised_sample==1, cluster(id)
outreg2 using "table4a", replace bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel A)

gen samplea1 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea1==1, cluster(id)
outreg2 using "table4a", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel A)

logit prio_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if revised_sample==1, cluster(id)
outreg2 using "table4a", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel A)

gen samplea3 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea3==1, cluster(id)
outreg2 using "table4a", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel A)

logit prio_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950  logGDP_cap2000_sup_1_impute peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if revised_sample==1, cluster(id)
outreg2 using "table4a", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel A)

gen samplea5 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea5==1, cluster(id)
outreg2 using "table4a", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel A)

logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if revised_sample==1 & me_nafr_revised==0, cluster(id)
outreg2 using "table4a", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel A)

gen samplea7 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea7==1 & me_nafr_revised==0, cluster(id)
outreg2 using "table4a", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel A)

logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if revised_sample==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "table4a", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel A)

gen samplea9 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea9==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "table4a", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel A)

drop samplea1
drop samplea3
drop samplea5
drop samplea7
drop samplea9


***************************
**** TABLE 4, PANEL B ****
**************************

btscs fl_center_termination year id2 if revised_sample==1, g(peaceyears) nspline(3)
rename peaceyears peaceyears_4b
rename _spline1 _spline1_4b
rename _spline2 _spline2_4b
rename _spline3 _spline3_4b

logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if revised_sample==1, cluster(id)
outreg2 using "table4b", replace bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel B)

gen sampleb1 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb1==1, cluster(id)
outreg2 using "table4b", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel B)

logit fl_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate logGDP_cap2000_sup_1_impute ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if revised_sample==1, cluster(id)
outreg2 using "table4b", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel B)

gen sampleb3 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb3==1, cluster(id)
outreg2 using "table4b", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel B)

logit fl_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if revised_sample==1, cluster(id)
outreg2 using "table4b", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel B)

gen sampleb5 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb5==1, cluster(id)
outreg2 using "table4b", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel B)

logit fl_center_do logoil_gas_valuePOP_1 logGDP_cap2000_sup_1_impute ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if revised_sample==1 & me_nafr_revised==0, cluster(id)
outreg2 using "table4b", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel B)

gen sampleb7 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb7==1 & me_nafr_revised==0, cluster(id)
outreg2 using "table4b", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel B)

logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if revised_sample==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "table4b", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel B)

gen sampleb9 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb9==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "table4b", bdec(3) tdec(3) rdec(2) nocon title(Table 4 Panel B)

drop sampleb1
drop sampleb3
drop sampleb5
drop sampleb7
drop sampleb9


****************************
**** TABLE C1, PANEL A ****
***************************

quietly logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen samplea1 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_gdp_1913 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea1==1, cluster(id)
outreg2 using "tablec1a", replace bdec(3) tdec(3) rdec(2) nocon title(Table C1 Panel A)

quietly logit prio_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen samplea3 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 ln_gdp_1913 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea3==1, cluster(id)
outreg2 using "tablec1a", bdec(3) tdec(3) rdec(2) nocon title(Table C1 Panel A)

quietly logit prio_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950  logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen samplea5 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 ln_gdp_1913 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea5==1, cluster(id)
outreg2 using "tablec1a", bdec(3) tdec(3) rdec(2) nocon title(Table C1 Panel A)

quietly logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1 & me_nafr_revised==0, cluster(id)
gen samplea7 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_gdp_1913 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea7==1 & me_nafr_revised==0, cluster(id)
outreg2 using "tablec1a", bdec(3) tdec(3) rdec(2) nocon title(Table C1 Panel A)

quietly logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1 & id!="IRN" & id!="IRQ", cluster(id)
gen samplea9 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_gdp_1913 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea9==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "tablec1a", bdec(3) tdec(3) rdec(2) nocon title(Table C1 Panel A)

drop samplea1
drop samplea3
drop samplea5
drop samplea7
drop samplea9


****************************
**** TABLE C1, PANEL B ****
***************************

quietly logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen sampleb1 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_gdp_1913 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb1==1, cluster(id)
outreg2 using "tablec1b", replace bdec(3) tdec(3) rdec(2) nocon title(Table C1 Panel B)

quietly logit fl_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate logGDP_cap2000_sup_1_impute ln_pop_1950 if revised_sample==1, cluster(id)
gen sampleb3 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 ln_gdp_1913 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb3==1, cluster(id)
outreg2 using "tablec1b", bdec(3) tdec(3) rdec(2) nocon title(Table C1 Panel B)

quietly logit fl_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen sampleb5 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 ln_gdp_1913 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb5==1, cluster(id)
outreg2 using "tablec1b", bdec(3) tdec(3) rdec(2) nocon title(Table C1 Panel B)

quietly logit fl_center_do logoil_gas_valuePOP_1 logGDP_cap2000_sup_1_impute ln_pop_1950 if revised_sample==1 & me_nafr_revised==0, cluster(id)
gen sampleb7 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_gdp_1913 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb7==1 & me_nafr_revised==0, cluster(id)
outreg2 using "tablec1b", bdec(3) tdec(3) rdec(2) nocon title(Table C1 Panel B)

quietly logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1 & id!="IRN" & id!="IRQ", cluster(id)
gen sampleb9 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_gdp_1913 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb9==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "tablec1b", bdec(3) tdec(3) rdec(2) nocon title(Table C1 Panel B)

drop sampleb1
drop sampleb3
drop sampleb5
drop sampleb7
drop sampleb9


******************
**** TABLE C2 ****
******************

*Generate Alexeev and Conrad’s (2009) counterfactual non-oil income per capita variable

reg logGDP_cap2000_sup_1_impute latin e_asia absolute_latitude if year==1970 & revised_sample==1
predict ln_ac_gdp_counterfactual, xb


****************************
**** TABLE C2, PANEL A ****
***************************


quietly logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen samplea1 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_ac_gdp_counterfactual peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea1==1, cluster(id)
outreg2 using "tablec2a", replace bdec(3) tdec(3) rdec(2) nocon title(Table C2 Panel A)

quietly logit prio_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen samplea3 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 ln_ac_gdp_counterfactual peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea3==1, cluster(id)
outreg2 using "tablec2a", bdec(3) tdec(3) rdec(2) nocon title(Table C2 Panel A)

quietly logit prio_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950  logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen samplea5 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 ln_ac_gdp_counterfactual peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea5==1, cluster(id)
outreg2 using "tablec2a", bdec(3) tdec(3) rdec(2) nocon title(Table C2 Panel A)

quietly logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1 & me_nafr_revised==0, cluster(id)
gen samplea7 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_ac_gdp_counterfactual peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea7==1 & me_nafr_revised==0, cluster(id)
outreg2 using "tablec2a", bdec(3) tdec(3) rdec(2) nocon title(Table C2 Panel A)

quietly logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1 & id!="IRN" & id!="IRQ", cluster(id)
gen samplea9 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_ac_gdp_counterfactual peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea9==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "tablec2a", bdec(3) tdec(3) rdec(2) nocon title(Table C2 Panel A)

drop samplea1
drop samplea3
drop samplea5
drop samplea7
drop samplea9


****************************
**** TABLE C2, PANEL B ****
***************************

quietly logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen sampleb1 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_ac_gdp_counterfactual peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb1==1, cluster(id)
outreg2 using "tablec2b", replace bdec(3) tdec(3) rdec(2) nocon title(Table C2 Panel B)

quietly logit fl_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate logGDP_cap2000_sup_1_impute ln_pop_1950 if revised_sample==1, cluster(id)
gen sampleb3 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 ln_ac_gdp_counterfactual peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb3==1, cluster(id)
outreg2 using "tablec2b", bdec(3) tdec(3) rdec(2) nocon title(Table C2 Panel B)

quietly logit fl_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen sampleb5 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 ln_ac_gdp_counterfactual peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb5==1, cluster(id)
outreg2 using "tablec2b", bdec(3) tdec(3) rdec(2) nocon title(Table C2 Panel B)

quietly logit fl_center_do logoil_gas_valuePOP_1 logGDP_cap2000_sup_1_impute ln_pop_1950 if revised_sample==1 & me_nafr_revised==0, cluster(id)
gen sampleb7 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_ac_gdp_counterfactual peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb7==1 & me_nafr_revised==0, cluster(id)
outreg2 using "tablec2b", bdec(3) tdec(3) rdec(2) nocon title(Table C2 Panel B)

quietly logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1 & id!="IRN" & id!="IRQ", cluster(id)
gen sampleb9 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_ac_gdp_counterfactual peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb9==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "tablec2b", bdec(3) tdec(3) rdec(2) nocon title(Table C2 Panel B)

drop sampleb1
drop sampleb3
drop sampleb5
drop sampleb7
drop sampleb9


******************
**** TABLE C3 ****
******************

*Generate non-oil income per capita variable

gen total_income = exp(logGDP_cap2000_sup_1_impute)
replace total_income = . if logGDP_cap2000_sup_1_impute==.
gen total_oil = exp(logoil_gas_valuePOP_1)-1
replace total_oil = . if logoil_gas_valuePOP_1==.
gen total_nonoil = total_income - total_oil if total_oil!=. & total_income!=.
replace total_nonoil = 1 if total_nonoil<1 & total_nonoil!=.
gen ln_nonoil = ln(total_nonoil)
drop total_income
drop total_oil
drop total_nonoil


****************************
**** TABLE C3, PANEL A ****
***************************

quietly logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen samplea1 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_nonoil peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea1==1, cluster(id)
outreg2 using "tablec3a", replace bdec(3) tdec(3) rdec(2) nocon title(Table C3 Panel A)

quietly logit prio_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen samplea3 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 ln_nonoil peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea3==1, cluster(id)
outreg2 using "tablec3a", bdec(3) tdec(3) rdec(2) nocon title(Table C3 Panel A)

quietly logit prio_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950  logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen samplea5 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 ln_nonoil peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea5==1, cluster(id)
outreg2 using "tablec3a", bdec(3) tdec(3) rdec(2) nocon title(Table C3 Panel A)

quietly logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1 & me_nafr_revised==0, cluster(id)
gen samplea7 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_nonoil peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea7==1 & me_nafr_revised==0, cluster(id)
outreg2 using "tablec3a", bdec(3) tdec(3) rdec(2) nocon title(Table C3 Panel A)

quietly logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1 & id!="IRN" & id!="IRQ", cluster(id)
gen samplea9 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_nonoil peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea9==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "tablec3a", bdec(3) tdec(3) rdec(2) nocon title(Table C3 Panel A)

drop samplea1
drop samplea3
drop samplea5
drop samplea7
drop samplea9


****************************
**** TABLE C3, PANEL B ****
***************************

quietly logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen sampleb1 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_nonoil peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb1==1, cluster(id)
outreg2 using "tablec3b", replace bdec(3) tdec(3) rdec(2) nocon title(Table C3 Panel B)

quietly logit fl_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate logGDP_cap2000_sup_1_impute ln_pop_1950 if revised_sample==1, cluster(id)
gen sampleb3 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 ln_nonoil peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb3==1, cluster(id)
outreg2 using "tablec3b", bdec(3) tdec(3) rdec(2) nocon title(Table C3 Panel B)

quietly logit fl_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen sampleb5 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 ln_nonoil peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb5==1, cluster(id)
outreg2 using "tablec3b", bdec(3) tdec(3) rdec(2) nocon title(Table C3 Panel B)

quietly logit fl_center_do logoil_gas_valuePOP_1 logGDP_cap2000_sup_1_impute ln_pop_1950 if revised_sample==1 & me_nafr_revised==0, cluster(id)
gen sampleb7 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_nonoil peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb7==1 & me_nafr_revised==0, cluster(id)
outreg2 using "tablec3b", bdec(3) tdec(3) rdec(2) nocon title(Table C3 Panel B)

quietly logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1 & id!="IRN" & id!="IRQ", cluster(id)
gen sampleb9 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_nonoil peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb9==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "tablec3b", bdec(3) tdec(3) rdec(2) nocon title(Table C3 Panel B)

drop sampleb1
drop sampleb3
drop sampleb5
drop sampleb7
drop sampleb9


******************
**** TABLE C4 ****
******************

*Generate Herb’s (2005) counterfactual non-oil income per capita variable

gen total_income = exp(logGDP_cap2000_sup_1_impute)
replace total_income = . if logGDP_cap2000_sup_1_impute==.

gen ln_herb_gdp_counterfactual = logGDP_cap2000_sup_1_impute if logGDP_cap2000_sup_1_impute!=. & revised_sample==1

gen arabia_counterfactual = 0
replace arabia_counterfactual = 1 if country=="Egypt, Arab Rep."
replace arabia_counterfactual = 1 if country=="Jordan"
replace arabia_counterfactual = 1 if country=="Yemen, Rep."

gen iran_counterfactual = 0
replace iran_counterfactual = 1 if country=="Turkey"
replace iran_counterfactual = 1 if country=="Pakistan"

gen iraq_counterfactual = 0
replace iraq_counterfactual = 1 if country=="Egypt, Arab Rep."
replace iraq_counterfactual = 1 if country=="Jordan"

gen libya_counterfactual = 0
replace libya_counterfactual = 1 if country=="Egypt, Arab Rep."

gen algeria_counterfactual = 0
replace algeria_counterfactual = 1 if country=="Morocco"
replace algeria_counterfactual = 1 if country=="Tunisia"

gen ssaoil_counterfactual = ssafrica
replace ssaoil_counterfactual = 0 if country=="Botswana"
replace ssaoil_counterfactual = 0 if country=="Congo, Rep."
replace ssaoil_counterfactual = 0 if country=="Equatorial Guinea"
replace ssaoil_counterfactual = 0 if country=="Gabon"

gen venezuela_counterfactual = 0
replace venezuela_counterfactual = 1 if country=="Brazil"

gen brunei_counterfactual = 0
replace brunei_counterfactual = 1 if country=="Fiji"
replace brunei_counterfactual = 1 if country=="Papua New Guinea"
replace brunei_counterfactual = 1 if country=="Solomon Islands"

foreach i of numlist 1960/2006 {
	summarize total_income if arabia_counterfactual==1 & year==`i'
replace ln_herb_gdp_counterfactual = ln(r(mean)) if country=="Bahrain" & year==`i' & r(mean)!=.
replace ln_herb_gdp_counterfactual = ln(r(mean)) if country=="Kuwait" & year==`i' & r(mean)!=.
replace ln_herb_gdp_counterfactual = ln(r(mean)) if country=="Oman" & year==`i' & r(mean)!=.
replace ln_herb_gdp_counterfactual = ln(r(mean)) if country=="Qatar" & year==`i' & r(mean)!=.
replace ln_herb_gdp_counterfactual = ln(r(mean)) if country=="Saudi Arabia" & year==`i' & r(mean)!=.
replace ln_herb_gdp_counterfactual = ln(r(mean)) if country=="United Arab Emirates" & year==`i' & r(mean)!=.
summarize total_income if iran_counterfactual==1 & year==`i'
replace ln_herb_gdp_counterfactual = ln(r(mean)) if country=="Iran, Islamic Rep." & year==`i' & r(mean)!=.
summarize total_income if iraq_counterfactual==1 & year==`i'
replace ln_herb_gdp_counterfactual = ln(r(mean)) if country=="Iraq" & year==`i' & r(mean)!=.
summarize total_income if libya_counterfactual==1 & year==`i'
replace ln_herb_gdp_counterfactual = ln(r(mean)) if country=="Libya" & year==`i' & r(mean)!=.
summarize total_income if algeria_counterfactual==1 & year==`i'
replace ln_herb_gdp_counterfactual = ln(r(mean)) if country=="Algeria" & year==`i' & r(mean)!=.
summarize total_income if ssaoil_counterfactual==1 & year==`i'
replace ln_herb_gdp_counterfactual = ln(r(mean)) if country=="Congo, Rep." & year==`i' & r(mean)!=.
replace ln_herb_gdp_counterfactual = ln(r(mean)) if country=="Equatorial Guinea" & year==`i' & r(mean)!=.
replace ln_herb_gdp_counterfactual = ln(r(mean)) if country=="Gabon" & year==`i' & r(mean)!=.
summarize total_income if brunei_counterfactual==1 & year==`i'
replace ln_herb_gdp_counterfactual = ln(r(mean)) if country=="Brunei Darussalam" & year==`i' & r(mean)!=.
        }

replace ln_herb_gdp_counterfactual = .67*total_income if country=="Trinidad and Tobago"
replace ln_herb_gdp_counterfactual = ln(ln_herb_gdp_counterfactual) if country=="Trinidad and Tobago"


****************************
**** TABLE C4, PANEL A ****
***************************

quietly logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen samplea1 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_herb_gdp_counterfactual peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea1==1, cluster(id)
outreg2 using "tablec4a", replace bdec(3) tdec(3) rdec(2) nocon title(Table C4 Panel A)

quietly logit prio_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen samplea3 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 ln_herb_gdp_counterfactual peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea3==1, cluster(id)
outreg2 using "tablec4a", bdec(3) tdec(3) rdec(2) nocon title(Table C4 Panel A)

quietly logit prio_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950  logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen samplea5 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 ln_herb_gdp_counterfactual peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea5==1, cluster(id)
outreg2 using "tablec4a", bdec(3) tdec(3) rdec(2) nocon title(Table C4 Panel A)

quietly logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1 & me_nafr_revised==0, cluster(id)
gen samplea7 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_herb_gdp_counterfactual peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea7==1 & me_nafr_revised==0, cluster(id)
outreg2 using "tablec4a", bdec(3) tdec(3) rdec(2) nocon title(Table C4 Panel A)

quietly logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1 & id!="IRN" & id!="IRQ", cluster(id)
gen samplea9 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_herb_gdp_counterfactual peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea9==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "tablec4a", bdec(3) tdec(3) rdec(2) nocon title(Table C4 Panel A)

drop samplea1
drop samplea3
drop samplea5
drop samplea7
drop samplea9


****************************
**** TABLE C4, PANEL B ****
***************************

quietly logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen sampleb1 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_herb_gdp_counterfactual peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb1==1, cluster(id)
outreg2 using "tablec4b", replace bdec(3) tdec(3) rdec(2) nocon title(Table C4 Panel B)

quietly logit fl_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate logGDP_cap2000_sup_1_impute ln_pop_1950 if revised_sample==1, cluster(id)
gen sampleb3 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 ln_herb_gdp_counterfactual peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb3==1, cluster(id)
outreg2 using "tablec4b", bdec(3) tdec(3) rdec(2) nocon title(Table C4 Panel B)

quietly logit fl_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen sampleb5 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 ln_herb_gdp_counterfactual peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb5==1, cluster(id)
outreg2 using "tablec4b", bdec(3) tdec(3) rdec(2) nocon title(Table C4 Panel B)

quietly logit fl_center_do logoil_gas_valuePOP_1 logGDP_cap2000_sup_1_impute ln_pop_1950 if revised_sample==1 & me_nafr_revised==0, cluster(id)
gen sampleb7 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_herb_gdp_counterfactual peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb7==1 & me_nafr_revised==0, cluster(id)
outreg2 using "tablec4b", bdec(3) tdec(3) rdec(2) nocon title(Table C4 Panel B)

quietly logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1 & id!="IRN" & id!="IRQ", cluster(id)
gen sampleb9 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 ln_herb_gdp_counterfactual peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb9==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "tablec4b", bdec(3) tdec(3) rdec(2) nocon title(Table C4 Panel B)

drop sampleb1
drop sampleb3
drop sampleb5
drop sampleb7
drop sampleb9


*******************
**** TABLE C5 ****
******************

quietly logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen sample1 = 1 if e(sample)==1
xi: logit prio_center_do logoil_gas_valuePOP_1 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a i.id2 if sample1==1, cluster(id)
outreg2 using "tablec5", replace bdec(3) tdec(3) rdec(2) nocon title(Table C5)

quietly logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute if revised_sample==1, cluster(id)
gen sample3 = 1 if e(sample)==1
xi: logit fl_center_do logoil_gas_valuePOP_1 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b i.id2 if sample3==1, cluster(id)
outreg2 using "tablec5", bdec(3) tdec(3) rdec(2) nocon title(Table C5)

drop sample1
drop sample3


****************************
**** TABLE C6, PANEL A ****
***************************

logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if revised_sample==1 & year>=1990, cluster(id)
outreg2 using "tablec6a", replace bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel A)

gen samplea1 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea1==1 & year>=1990, cluster(id)
outreg2 using "tablec6a", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel A)

logit prio_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if revised_sample==1 & year>=1990, cluster(id)
outreg2 using "tablec6a", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel A)

gen samplea3 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea3==1 & year>=1990, cluster(id)
outreg2 using "tablec6a", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel A)

logit prio_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950  logGDP_cap2000_sup_1_impute peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if revised_sample==1 & year>=1990, cluster(id)
outreg2 using "tablec6a", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel A)

gen samplea5 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea5==1 & year>=1990, cluster(id)
outreg2 using "tablec6a", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel A)

logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if revised_sample==1 & me_nafr_revised==0 & year>=1990, cluster(id)
outreg2 using "tablec6a", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel A)

gen samplea7 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea7==1 & me_nafr_revised==0 & year>=1990, cluster(id)
outreg2 using "tablec6a", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel A)

logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if revised_sample==1 & id!="IRN" & id!="IRQ" & year>=1990, cluster(id)
outreg2 using "tablec6a", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel A)

gen samplea9 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea9==1 & id!="IRN" & id!="IRQ" & year>=1990, cluster(id)
outreg2 using "tablec6a", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel A)

drop samplea1
drop samplea3
drop samplea5
drop samplea7
drop samplea9


****************************
**** TABLE C6, PANEL B ****
***************************

logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if revised_sample==1 & year>=1990, cluster(id)
outreg2 using "tablec6b", replace bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel B)

gen sampleb1 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb1==1 & year>=1990, cluster(id)
outreg2 using "tablec6b", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel B)

logit fl_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate logGDP_cap2000_sup_1_impute ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if revised_sample==1 & year>=1990, cluster(id)
outreg2 using "tablec6b", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel B)

gen sampleb3 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb3==1 & year>=1990, cluster(id)
outreg2 using "tablec6b", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel B)

logit fl_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if revised_sample==1 & year>=1990, cluster(id)
outreg2 using "tablec6b", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel B)

gen sampleb5 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb5==1 & year>=1990, cluster(id)
outreg2 using "tablec6b", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel B)

logit fl_center_do logoil_gas_valuePOP_1 logGDP_cap2000_sup_1_impute ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if revised_sample==1 & me_nafr_revised==0 & year>=1990, cluster(id)
outreg2 using "tablec6b", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel B)

gen sampleb7 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb7==1 & me_nafr_revised==0 & year>=1990, cluster(id)
outreg2 using "tablec6b", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel B)

logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if revised_sample==1 & id!="IRN" & id!="IRQ" & year>=1990, cluster(id)
outreg2 using "tablec6b", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel B)

gen sampleb9 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb9==1 & id!="IRN" & id!="IRQ" & year>=1990, cluster(id)
outreg2 using "tablec6b", bdec(3) tdec(3) rdec(2) nocon title(Table C6 Panel B)

drop sampleb1
drop sampleb3
drop sampleb5
drop sampleb7
drop sampleb9


****************************
**** TABLE C7, PANEL A ****
***************************

logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if revised_sample==1 & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7a", replace bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel A)

gen samplea1 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea1==1 & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7a", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel A)

logit prio_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if revised_sample==1 & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7a", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel A)

gen samplea3 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea3==1 & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7a", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel A)

logit prio_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950  logGDP_cap2000_sup_1_impute peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if revised_sample==1 & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7a", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel A)

gen samplea5 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea5==1 & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7a", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel A)

logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if revised_sample==1 & me_nafr_revised==0 & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7a", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel A)

gen samplea7 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea7==1 & me_nafr_revised==0 & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7a", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel A)

logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if revised_sample==1 & id!="IRN" & id!="IRQ" & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7a", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel A)

gen samplea9 = 1 if e(sample)==1
logit prio_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4a _spline1_4a _spline2_4a _spline3_4a if samplea9==1 & id!="IRN" & id!="IRQ" & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7a", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel A)

drop samplea1
drop samplea3
drop samplea5
drop samplea7
drop samplea9


****************************
**** TABLE C7, PANEL B ****
***************************

logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if revised_sample==1 & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7b", replace bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel B)

gen sampleb1 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb1==1 & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7b", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel B)


logit fl_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate logGDP_cap2000_sup_1_impute ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if revised_sample==1 & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7b", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel B)

gen sampleb3 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb3==1 & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7b", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel B)

logit fl_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if revised_sample==1 & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7b", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel B)

gen sampleb5 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb5==1 & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7b", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel B)

logit fl_center_do logoil_gas_valuePOP_1 logGDP_cap2000_sup_1_impute ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if revised_sample==1 & me_nafr_revised==0 & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7b", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel B)

gen sampleb7 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb7==1 & me_nafr_revised==0 & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7b", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel B)

logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if revised_sample==1 & id!="IRN" & id!="IRQ" & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7b", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel B)

gen sampleb9 = 1 if e(sample)==1
logit fl_center_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_4b _spline1_4b _spline2_4b _spline3_4b if sampleb9==1 & id!="IRN" & id!="IRQ" & logGDP_cap2000_sup_1_impute<8.517, cluster(id)
outreg2 using "tablec7b", bdec(3) tdec(3) rdec(2) nocon title(Table C7 Panel B)

drop sampleb1
drop sampleb3
drop sampleb5
drop sampleb7
drop sampleb9


****************************
**** TABLE C8, PANEL A ****
***************************

btscs sep_conflict_onset_2_dich year id2, g(peaceyears) nspline(3)
rename peaceyears peaceyears_c8a
rename _spline1 _spline1_c8a
rename _spline2 _spline2_c8a
rename _spline3 _spline3_c8a

logit  sep_conflict_onset_2_dich logoil_gas_valuePOP_1 logGDP_cap2000_sup_1  pop_log_1 peaceyears_c8a _spline1_c8a _spline2_c8a _spline3_c8a, cluster(id) 
outreg2 using "table8a", replace bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel A) 
  
gen samplea1 = 1 if e(sample)==1 
logit  sep_conflict_onset_2_dich  logoil_gas_valuePOP_1  pop_log_1 peaceyears_c8a _spline1_c8a _spline2_c8a _spline3_c8a if samplea1==1, cluster(id) 
outreg2 using "table8a", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel A)

logit  sep_conflict_onset_2_dich logoil_gas_valuePOP_1 logGDP_cap2000_sup_1  pop_log_1 polity_1 polity_sq_1 ef relfrac lmtnest ncontig nwstate instab_new_1 peaceyears_c8a _spline1_c8a _spline2_c8a _spline3_c8a, cluster(id) 
outreg2 using "table8a", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel A)

gen samplea3 = 1 if e(sample)==1 
logit  sep_conflict_onset_2_dich  logoil_gas_valuePOP_1  pop_log_1 polity_1 polity_sq_1 ef relfrac lmtnest ncontig nwstate instab_new_1 peaceyears_c8a _spline1_c8a _spline2_c8a _spline3_c8a if samplea3==1, cluster(id) 
outreg2 using "table8a", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel A)

logit  sep_conflict_onset_2_dich logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_c8a _spline1_c8a _spline2_c8a _spline3_c8a me_nafr ssafrica latin asia, cluster(id)   
outreg2 using "table8a", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel A)

gen samplea5 = 1 if e(sample)==1 
logit  sep_conflict_onset_2_dich  logoil_gas_valuePOP_1  pop_log_1 peaceyears_c8a _spline1_c8a _spline2_c8a _spline3_c8a me_nafr ssafrica latin asia if samplea5==1, cluster(id) 
outreg2 using "table8a", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel A)

logit  sep_conflict_onset_2_dich logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_c8a _spline1_c8a _spline2_c8a _spline3_c8a if me_nafr==0, cluster(id)   
outreg2 using "table8a", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel A)

gen samplea7 = 1 if e(sample)==1 
logit  sep_conflict_onset_2_dich  logoil_gas_valuePOP_1  pop_log_1 peaceyears_c8a _spline1_c8a _spline2_c8a _spline3_c8a if me_nafr==0 & samplea7==1, cluster(id) 
outreg2 using "table8a", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel A)

logit  sep_conflict_onset_2_dich logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_c8a _spline1_c8a _spline2_c8a  _spline3_c8a if id!="IRN" & id!="IRQ", cluster(id) 
outreg2 using "table8a", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel A)

gen samplea9 = 1 if e(sample) == 1 
logit  sep_conflict_onset_2_dich  logoil_gas_valuePOP_1  pop_log_1 peaceyears_c8a _spline1_c8a _spline2_c8a _spline3_c8a if id!="IRN" & id!="IRQ" & samplea9==1, cluster(id) 
outreg2 using "table8a", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel A)

drop samplea1
drop samplea3
drop samplea5
drop samplea7
drop samplea9


***************************
**** TABLE C8, PANEL B ****
***************************

btscs fl_sep_tablec8 year id2, g(peaceyears) nspline(3)
rename peaceyears peaceyears_c8b
rename _spline1 _spline1_c8b
rename _spline2 _spline2_c8b
rename _spline3 _spline3_c8b

logit fl_sep_tablec8 logoil_gas_valuePOP_1 logGDP_cap2000_sup_1  pop_log_1 peaceyears_c8b _spline1_c8b _spline2_c8b _spline3_c8b, cluster(id)  
outreg2 using "table8b", replace bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel B) 

gen sampleb1 = 1 if e(sample)==1
logit fl_sep_tablec8 logoil_gas_valuePOP_1  pop_log_1 peaceyears_c8b _spline1_c8b _spline2_c8b _spline3_c8b if sampleb1==1, cluster(id)  
outreg2 using "table8b", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel B)

logit fl_sep_tablec8 logoil_gas_valuePOP_1 logGDP_cap2000_sup_1  pop_log_1 polity_1 polity_sq_1 ef relfrac lmtnest ncontig nwstate instab_new_1 peaceyears_c8b _spline1_c8b _spline2_c8b _spline3_c8b, cluster(id)
outreg2 using "table8b", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel B)

gen sampleb3 = 1 if e(sample)==1
logit  fl_sep_tablec8 logoil_gas_valuePOP_1  pop_log_1 polity_1 polity_sq_1 ef relfrac lmtnest ncontig nwstate instab_new_1 peaceyears_c8b _spline1_c8b _spline2_c8b _spline3_c8b if sampleb3==1, cluster(id)
outreg2 using "table8b", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel B)

logit  fl_sep_tablec8 logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_c8b _spline1_c8b _spline2_c8b _spline3_c8b me_nafr ssafrica latin asia, cluster(id)
outreg2 using "table8b", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel B)  

gen sampleb5 = 1 if e(sample)==1
logit  fl_sep_tablec8 logoil_gas_valuePOP_1  pop_log_1 peaceyears_c8b _spline1_c8b _spline2_c8b _spline3_c8b me_nafr ssafrica latin asia if sampleb5==1, cluster(id)
outreg2 using "table8b", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel B) 

logit  fl_sep_tablec8 logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_c8b _spline1_c8b _spline2_c8b _spline3_c8b if me_nafr==0, cluster(id)
outreg2 using "table8b", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel B)  

gen sampleb7 = 1 if e(sample)==1
logit  fl_sep_tablec8 logoil_gas_valuePOP_1  pop_log_1 peaceyears_c8b _spline1_c8b _spline2_c8b _spline3_c8b if me_nafr==0 & sampleb7==1, cluster(id)
outreg2 using "table8b", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel B) 
 
logit  fl_sep_tablec8 logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_c8b _spline1_c8b _spline2_c8b _spline3_c8b if id!="IRN" & id!="IRQ", cluster(id) 
outreg2 using "table8b", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel B)  

gen sampleb9 = 1 if e(sample) == 1
logit  fl_sep_tablec8 logoil_gas_valuePOP_1  pop_log_1 peaceyears_c8b _spline1_c8b _spline2_c8b _spline3_c8b if id!="IRN" & id!="IRQ" & sampleb9==1, cluster(id)
outreg2 using "table8b", bdec(3) tdec(3) rdec(2) nocon title(Table 8 Panel B)

drop sampleb1
drop sampleb3
drop sampleb5
drop sampleb7
drop sampleb9


****************************
**** TABLE C9, PANEL A ****
***************************

btscs dom_conflict_onset_2_dich year id2, g(peaceyears) nspline(3)
rename peaceyears peaceyears_c9a
rename _spline1 _spline1_c9a
rename _spline2 _spline2_c9a
rename _spline3 _spline3_c9a

logit  dom_conflict_onset_2_dich logoil_gas_valuePOP_1 logGDP_cap2000_sup_1  pop_log_1 peaceyears_c9a _spline1_c9a _spline2_c9a _spline3_c9a, cluster(id) 
outreg2 using "table9a", replace bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel A) 
  
gen samplea1 = 1 if e(sample)==1 
logit  dom_conflict_onset_2_dich  logoil_gas_valuePOP_1  pop_log_1 peaceyears_c9a _spline1_c9a _spline2_c9a _spline3_c9a if samplea1==1, cluster(id) 
outreg2 using "table9a", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel A)

logit  dom_conflict_onset_2_dich logoil_gas_valuePOP_1 logGDP_cap2000_sup_1  pop_log_1 polity_1 polity_sq_1 ef relfrac lmtnest ncontig nwstate instab_new_1 peaceyears_c9a _spline1_c9a _spline2_c9a _spline3_c9a, cluster(id) 
outreg2 using "table9a", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel A)

gen samplea3 = 1 if e(sample)==1 
logit  dom_conflict_onset_2_dich  logoil_gas_valuePOP_1  pop_log_1 polity_1 polity_sq_1 ef relfrac lmtnest ncontig nwstate instab_new_1 peaceyears_c9a _spline1_c9a _spline2_c9a _spline3_c9a if samplea3==1, cluster(id) 
outreg2 using "table9a", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel A)

logit  dom_conflict_onset_2_dich logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_c9a _spline1_c9a _spline2_c9a _spline3_c9a me_nafr ssafrica latin asia, cluster(id)   
outreg2 using "table9a", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel A)

gen samplea5 = 1 if e(sample)==1 
logit  dom_conflict_onset_2_dich  logoil_gas_valuePOP_1  pop_log_1 peaceyears_c9a _spline1_c9a _spline2_c9a _spline3_c9a me_nafr ssafrica latin asia if samplea5==1, cluster(id) 
outreg2 using "table9a", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel A)

logit  dom_conflict_onset_2_dich logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_c9a _spline1_c9a _spline2_c9a _spline3_c9a if me_nafr==0, cluster(id)   
outreg2 using "table9a", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel A)

gen samplea7 = 1 if e(sample)==1 
logit  dom_conflict_onset_2_dich  logoil_gas_valuePOP_1  pop_log_1 peaceyears_c9a _spline1_c9a _spline2_c9a _spline3_c9a if me_nafr==0 & samplea7==1, cluster(id) 
outreg2 using "table9a", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel A)

logit  dom_conflict_onset_2_dich logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_c9a _spline1_c9a _spline2_c9a  _spline3_c9a if id!="IRN" & id!="IRQ", cluster(id) 
outreg2 using "table9a", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel A)

gen samplea9 = 1 if e(sample) == 1 
logit  dom_conflict_onset_2_dich  logoil_gas_valuePOP_1  pop_log_1 peaceyears_c9a _spline1_c9a _spline2_c9a _spline3_c9a if id!="IRN" & id!="IRQ" & samplea9==1, cluster(id) 
outreg2 using "table9a", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel A)

drop samplea1
drop samplea3
drop samplea5
drop samplea7
drop samplea9


***************************
**** TABLE C9, PANEL B ****
***************************

btscs fl_war_tablec9 year id2, g(peaceyears) nspline(3)
rename peaceyears peaceyears_c9b
rename _spline1 _spline1_c9b
rename _spline2 _spline2_c9b
rename _spline3 _spline3_c9b

logit fl_war_tablec9 logoil_gas_valuePOP_1 logGDP_cap2000_sup_1  pop_log_1 peaceyears_c9b _spline1_c9b _spline2_c9b _spline3_c9b, cluster(id)  
outreg2 using "table9b", replace bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel B) 

gen sampleb1 = 1 if e(sample)==1
logit fl_war_tablec9 logoil_gas_valuePOP_1  pop_log_1 peaceyears_c9b _spline1_c9b _spline2_c9b _spline3_c9b if sampleb1==1, cluster(id)  
outreg2 using "table9b", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel B)

logit fl_war_tablec9 logoil_gas_valuePOP_1 logGDP_cap2000_sup_1  pop_log_1 polity_1 polity_sq_1 ef relfrac lmtnest ncontig nwstate instab_new_1 peaceyears_c9b _spline1_c9b _spline2_c9b _spline3_c9b, cluster(id)
outreg2 using "table9b", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel B)

gen sampleb3 = 1 if e(sample)==1
logit  fl_war_tablec9 logoil_gas_valuePOP_1  pop_log_1 polity_1 polity_sq_1 ef relfrac lmtnest ncontig nwstate instab_new_1 peaceyears_c9b _spline1_c9b _spline2_c9b _spline3_c9b if sampleb3==1, cluster(id)
outreg2 using "table9b", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel B)

logit  fl_war_tablec9 logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_c9b _spline1_c9b _spline2_c9b _spline3_c9b me_nafr ssafrica latin asia, cluster(id)
outreg2 using "table9b", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel B)  

gen sampleb5 = 1 if e(sample)==1
logit  fl_war_tablec9 logoil_gas_valuePOP_1  pop_log_1 peaceyears_c9b _spline1_c9b _spline2_c9b _spline3_c9b me_nafr ssafrica latin asia if sampleb5==1, cluster(id)
outreg2 using "table9b", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel B) 

logit  fl_war_tablec9 logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_c9b _spline1_c9b _spline2_c9b _spline3_c9b if me_nafr==0, cluster(id)
outreg2 using "table9b", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel B)  

gen sampleb7 = 1 if e(sample)==1
logit  fl_war_tablec9 logoil_gas_valuePOP_1  pop_log_1 peaceyears_c9b _spline1_c9b _spline2_c9b _spline3_c9b if me_nafr==0 & sampleb7==1, cluster(id)
outreg2 using "table9b", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel B) 
 
logit  fl_war_tablec9 logoil_gas_valuePOP_1  logGDP_cap2000_sup_1  pop_log_1 peaceyears_c9b _spline1_c9b _spline2_c9b _spline3_c9b if id!="IRN" & id!="IRQ", cluster(id) 
outreg2 using "table9b", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel B)  

gen sampleb9 = 1 if e(sample) == 1
logit  fl_war_tablec9 logoil_gas_valuePOP_1  pop_log_1 peaceyears_c9b _spline1_c9b _spline2_c9b _spline3_c9b if id!="IRN" & id!="IRQ" & sampleb9==1, cluster(id)
outreg2 using "table9b", bdec(3) tdec(3) rdec(2) nocon title(Table 9 Panel B)

drop sampleb1
drop sampleb3
drop sampleb5
drop sampleb7
drop sampleb9


****************************
**** TABLE C10, PANEL A ****
****************************

btscs prio_sep_termination year id2 if revised_sample==1, g(peaceyears) nspline(3)
rename peaceyears peaceyears_c10a
rename _spline1 _spline1_c10a
rename _spline2 _spline2_c10a
rename _spline3 _spline3_c10a

logit prio_sep_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_c10a _spline1_c10a _spline2_c10a _spline3_c10a if revised_sample==1, cluster(id)
outreg2 using "tablec10a", replace bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel A)

gen samplea1 = 1 if e(sample)==1
logit prio_sep_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_c10a _spline1_c10a _spline2_c10a _spline3_c10a if samplea1==1, cluster(id)
outreg2 using "tablec10a", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel A)

logit prio_sep_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_c10a _spline1_c10a _spline2_c10a _spline3_c10a if revised_sample==1, cluster(id)
outreg2 using "tablec10a", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel A)

gen samplea3 = 1 if e(sample)==1
logit prio_sep_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 peaceyears_c10a _spline1_c10a _spline2_c10a _spline3_c10a if samplea3==1, cluster(id)
outreg2 using "tablec10a", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel A)

logit prio_sep_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950  logGDP_cap2000_sup_1_impute peaceyears_c10a _spline1_c10a _spline2_c10a _spline3_c10a if revised_sample==1, cluster(id)
outreg2 using "tablec10a", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel A)

gen samplea5 = 1 if e(sample)==1
logit prio_sep_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 peaceyears_c10a _spline1_c10a _spline2_c10a _spline3_c10a if samplea5==1, cluster(id)
outreg2 using "tablec10a", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel A)

logit prio_sep_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_c10a _spline1_c10a _spline2_c10a _spline3_c10a if revised_sample==1 & me_nafr_revised==0, cluster(id)
outreg2 using "tablec10a", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel A)

gen samplea7 = 1 if e(sample)==1
logit prio_sep_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_c10a _spline1_c10a _spline2_c10a _spline3_c10a if samplea7==1 & me_nafr_revised==0, cluster(id)
outreg2 using "tablec10a", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel A)

logit prio_sep_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_c10a _spline1_c10a _spline2_c10a _spline3_c10a if revised_sample==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "tablec10a", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel A)

gen samplea9 = 1 if e(sample)==1
logit prio_sep_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_c10a _spline1_c10a _spline2_c10a _spline3_c10a if samplea9==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "tablec10a", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel A)

drop samplea1
drop samplea3
drop samplea5
drop samplea7
drop samplea9


*****************************
**** TABLE C10, PANEL B ****
****************************

btscs fl_sep_termination year id2 if revised_sample==1, g(peaceyears) nspline(3)
rename peaceyears peaceyears_c10b
rename _spline1 _spline1_c10b
rename _spline2 _spline2_c10b
rename _spline3 _spline3_c10b

logit fl_sep_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_c10b _spline1_c10b _spline2_c10b _spline3_c10b if revised_sample==1, cluster(id)
outreg2 using "tablec10b", replace bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel B)

gen sampleb1 = 1 if e(sample)==1
logit fl_sep_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_c10b _spline1_c10b _spline2_c10b _spline3_c10b if sampleb1==1, cluster(id)
outreg2 using "tablec10b", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel B)

logit fl_sep_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate logGDP_cap2000_sup_1_impute ln_pop_1950 peaceyears_c10b _spline1_c10b _spline2_c10b _spline3_c10b if revised_sample==1, cluster(id)
outreg2 using "tablec10b", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel B)

gen sampleb3 = 1 if e(sample)==1
logit fl_sep_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 peaceyears_c10b _spline1_c10b _spline2_c10b _spline3_c10b if sampleb3==1, cluster(id)
outreg2 using "tablec10b", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel B)

logit fl_sep_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_c10b _spline1_c10b _spline2_c10b _spline3_c10b if revised_sample==1, cluster(id)
outreg2 using "tablec10b", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel B)

gen sampleb5 = 1 if e(sample)==1
logit fl_sep_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 peaceyears_c10b _spline1_c10b _spline2_c10b _spline3_c10b if sampleb5==1, cluster(id)
outreg2 using "tablec10b", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel B)

logit fl_sep_do logoil_gas_valuePOP_1 logGDP_cap2000_sup_1_impute ln_pop_1950 peaceyears_c10b _spline1_c10b _spline2_c10b _spline3_c10b if revised_sample==1 & me_nafr_revised==0, cluster(id)
outreg2 using "tablec10b", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel B)

gen sampleb7 = 1 if e(sample)==1
logit fl_sep_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_c10b _spline1_c10b _spline2_c10b _spline3_c10b if sampleb7==1 & me_nafr_revised==0, cluster(id)
outreg2 using "tablec10b", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel B)

logit fl_sep_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_c10b _spline1_c10b _spline2_c10b _spline3_c10b if revised_sample==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "tablec10b", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel B)

gen sampleb9 = 1 if e(sample)==1
logit fl_sep_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_c10b _spline1_c10b _spline2_c10b _spline3_c10b if sampleb9==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "tablec10b", bdec(3) tdec(3) rdec(2) nocon title(Table C10 Panel B)

drop sampleb1
drop sampleb3
drop sampleb5
drop sampleb7
drop sampleb9


*****************************
**** TABLE C11, PANEL A ****
****************************

btscs prio_war_termination year id2 if revised_sample==1, g(peaceyears) nspline(3)
rename peaceyears peaceyears_c11a
rename _spline1 _spline1_c11a
rename _spline2 _spline2_c11a
rename _spline3 _spline3_c11a

logit prio_war_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_c11a _spline1_c11a _spline2_c11a _spline3_c11a if revised_sample==1, cluster(id)
outreg2 using "tablec11a", replace bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel A)

gen samplea1 = 1 if e(sample)==1
logit prio_war_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_c11a _spline1_c11a _spline2_c11a _spline3_c11a if samplea1==1, cluster(id)
outreg2 using "tablec11a", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel A)

logit prio_war_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_c11a _spline1_c11a _spline2_c11a _spline3_c11a if revised_sample==1, cluster(id)
outreg2 using "tablec11a", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel A)

gen samplea3 = 1 if e(sample)==1
logit prio_war_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 peaceyears_c11a _spline1_c11a _spline2_c11a _spline3_c11a if samplea3==1, cluster(id)
outreg2 using "tablec11a", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel A)

logit prio_war_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950  logGDP_cap2000_sup_1_impute peaceyears_c11a _spline1_c11a _spline2_c11a _spline3_c11a if revised_sample==1, cluster(id)
outreg2 using "tablec11a", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel A)

gen samplea5 = 1 if e(sample)==1
logit prio_war_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 peaceyears_c11a _spline1_c11a _spline2_c11a _spline3_c11a if samplea5==1, cluster(id)
outreg2 using "tablec11a", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel A)

logit prio_war_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_c11a _spline1_c11a _spline2_c11a _spline3_c11a if revised_sample==1 & me_nafr_revised==0, cluster(id)
outreg2 using "tablec11a", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel A)

gen samplea7 = 1 if e(sample)==1
logit prio_war_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_c11a _spline1_c11a _spline2_c11a _spline3_c11a if samplea7==1 & me_nafr_revised==0, cluster(id)
outreg2 using "tablec11a", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel A)

logit prio_war_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_c11a _spline1_c11a _spline2_c11a _spline3_c11a if revised_sample==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "tablec11a", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel A)

gen samplea9 = 1 if e(sample)==1
logit prio_war_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_c11a _spline1_c11a _spline2_c11a _spline3_c11a if samplea9==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "tablec11a", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel A)

drop samplea1
drop samplea3
drop samplea5
drop samplea7
drop samplea9


*****************************
**** TABLE C11, PANEL B ****
****************************

btscs fl_war_termination year id2 if revised_sample==1, g(peaceyears) nspline(3)
rename peaceyears peaceyears_c11b
rename _spline1 _spline1_c11b
rename _spline2 _spline2_c11b
rename _spline3 _spline3_c11b

logit fl_war_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_c11b _spline1_c11b _spline2_c11b _spline3_c11b if revised_sample==1, cluster(id)
outreg2 using "tablec11b", replace bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel B)

gen sampleb1 = 1 if e(sample)==1
logit fl_war_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_c11b _spline1_c11b _spline2_c11b _spline3_c11b if sampleb1==1, cluster(id)
outreg2 using "tablec11b", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel B)

logit fl_war_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate logGDP_cap2000_sup_1_impute ln_pop_1950 peaceyears_c11b _spline1_c11b _spline2_c11b _spline3_c11b if revised_sample==1, cluster(id)
outreg2 using "tablec11b", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel B)

gen sampleb3 = 1 if e(sample)==1
logit fl_war_do logoil_gas_valuePOP_1 ef relfrac lmtnest ncontig nwstate ln_pop_1950 peaceyears_c11b _spline1_c11b _spline2_c11b _spline3_c11b if sampleb3==1, cluster(id)
outreg2 using "tablec11b", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel B)

logit fl_war_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_c11b _spline1_c11b _spline2_c11b _spline3_c11b if revised_sample==1, cluster(id)
outreg2 using "tablec11b", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel B)

gen sampleb5 = 1 if e(sample)==1
logit fl_war_do logoil_gas_valuePOP_1 me_nafr_revised ssafrica latin e_asia s_asia med_pac_islands ln_pop_1950 peaceyears_c11b _spline1_c11b _spline2_c11b _spline3_c11b if sampleb5==1, cluster(id)
outreg2 using "tablec11b", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel B)

logit fl_war_do logoil_gas_valuePOP_1 logGDP_cap2000_sup_1_impute ln_pop_1950 peaceyears_c11b _spline1_c11b _spline2_c11b _spline3_c11b if revised_sample==1 & me_nafr_revised==0, cluster(id)
outreg2 using "tablec11b", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel B)

gen sampleb7 = 1 if e(sample)==1
logit fl_war_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_c11b _spline1_c11b _spline2_c11b _spline3_c11b if sampleb7==1 & me_nafr_revised==0, cluster(id)
outreg2 using "tablec11b", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel B)

logit fl_war_do logoil_gas_valuePOP_1 ln_pop_1950 logGDP_cap2000_sup_1_impute peaceyears_c11b _spline1_c11b _spline2_c11b _spline3_c11b if revised_sample==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "tablec11b", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel B)

gen sampleb9 = 1 if e(sample)==1
logit fl_war_do logoil_gas_valuePOP_1 ln_pop_1950 peaceyears_c11b _spline1_c11b _spline2_c11b _spline3_c11b if sampleb9==1 & id!="IRN" & id!="IRQ", cluster(id)
outreg2 using "tablec11b", bdec(3) tdec(3) rdec(2) nocon title(Table C11 Panel B)

drop sampleb1
drop sampleb3
drop sampleb5
drop sampleb7
drop sampleb9
